package com.example.android.ui.hb.Adapter;

import androidx.recyclerview.widget.GridLayoutManager;

import com.example.android.bean.Goods;

import java.util.List;

public class HBSpanSizeLookup extends GridLayoutManager.SpanSizeLookup {

    private List<Goods> HBList;

    public HBSpanSizeLookup(List<Goods> HBList){
        this.HBList = HBList;
    }

    public void setHBList(List<Goods> HBList) {
        this.HBList.clear();
        this.HBList.addAll(HBList);
    }

    @Override
    public int getSpanSize(int position) {
        return HBList.get(position).getSpanSize();
    }
}
